package com.hao.servlet;


import com.hao.Dao.productjsqDao;
import com.hao.DaoImpl.productjsqImpl;
import com.hao.entity.productjsq;
import com.hao.entity.staff;
import com.hao.Dao.staffDao;
import com.hao.DaoImpl.staffImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

/**
 * Created by Administrator on 2018/8/10.
 */
public class Servletaddfind extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        request.setCharacterEncoding("utf-8");
        PrintWriter out = response.getWriter();


        int sid=-1;
        int wpid=-1;
        staffDao dd=new staffImpl();
        List<staff> list=dd.findstaff(sid);
        request.setAttribute("lists", list);

        productjsqDao ss=new productjsqImpl();
        List<productjsq> lists=ss.finduser(wpid);
        request.setAttribute("listk", lists);


        request.getRequestDispatcher("work-add.jsp").forward(request, response);

        out.flush();
        out.close();




    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
    }
}
